<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
  <meta charset="UTF-8">
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/style.css">
  <script type="text/javascript" src="js/jquery.min.js"></script>
  <script type="text/javascript" src="js/jquery.SuperSlide.js"></script>
  <script type="text/javascript">
  $(function(){
      $(".sideMenu").slide({
         titCell:"h3", 
         targetCell:"ul",
         defaultIndex:0, 
         effect:'slideDown', 
         delayTime:'500' , 
         trigger:'click', 
         triggerTime:'150', 
         defaultPlay:true, 
         returnDefault:false,
         easing:'easeInQuint',
         endFun:function(){
              scrollWW();
         }
       });
      $(window).resize(function() {
          scrollWW();
      });
  });
  function scrollWW(){
    if($(".side").height()<$(".sideMenu").height()){
       $(".scroll").show();
       var pos = $(".sideMenu ul:visible").position().top-38;
       $('.sideMenu').animate({top:-pos});
    }else{
       $(".scroll").hide();
       $('.sideMenu').animate({top:0});
       n=1;
    }
  } 

var n=1;
function menuScroll(num){
  var Scroll = $('.sideMenu');
  var ScrollP = $('.sideMenu').position();
  /*alert(n);
  alert(ScrollP.top);*/
  if(num==1){
     Scroll.animate({top:ScrollP.top-38});
     n = n+1;
  }else{
    if (ScrollP.top > -38 && ScrollP.top != 0) { ScrollP.top = -38; }
    if (ScrollP.top<0) {
      Scroll.animate({top:38+ScrollP.top});
    }else{
      n=1;
    }
    if(n>1){
      n = n-1;
    }
  }
}
  </script>
  <title>后台首页</title>
</head>
<body>
    <div class="top">
      <div id="top_t">
        <div id="logo" class="fl"></div>
        <div id="photo_info" class="fr">
          <div id="photo" class="fl">
            <a href="#"><img src="images/a.png" alt="" width="60" height="60"></a>
          </div>
          <div id="base_info" class="fr">
            <div class="help_info">
              <a href="1" id="hp">&nbsp;</a>
              <a href="2" id="gy">&nbsp;</a>
              <a href="<%=path %>/admin/login_outLogin.action" id="out"  >&nbsp;</a>
            </div>
            <div class="info_center">
               <%=session.getAttribute("name") %>
              <span id="nt"></span><span><a></a></span>
            </div>
          </div>
        </div>
      </div>
      <div id="side_here">
        <div id="side_here_l" class="fl"></div>
        <div id="here_area" class="fl"></div>
      </div>
    </div>
    <div class="side">
        <div class="sideMenu" style="margin:0 auto">
        <s:if test="#session.role==1">
          <h3>请假</h3>
          <ul>
           <li><a href="<%=path %>/admin/vacate.action" target="right">请假申请</a></li>
          </ul>
        
           <h3> 请假记录</h3>
          <ul>
           <li>
            <a href="<%=path %>/admin/vacate_queryList.action" target="right">请假记录</a>
            </li>  
          </ul>
           </s:if>
           
          <s:if test="#session.role!=4&&#session.role!=1"> 
           <h3>审核</h3>
          <ul>
           <li>
            <a href="<%=path %>/admin/vacate_queryList.action?pageList.pageNo=1" target="right">请假审核</a>
            </li> 
            <li>
            <a href="<%=path %>/admin/vacate/chart.jsp" target="right">请假统计</a>
            </li>  
          </ul>
          </s:if>
          <h3>个人信息</h3>
          <ul>
           <s:if test="#session.role!=4">
            <li>
             <a href="<%=path %>/admin/<%=session.getAttribute("roleName") %>.action" target="right">个人信息查询</a></li>
            <li>
            <a href="<%=path %>/admin/<%=session.getAttribute("roleName") %>_queryById.action" target="right">个人信息修改</a>
            </li>
           </s:if>
           <s:else>
            <li>
            <a href="<%=path %>/admin/<%=session.getAttribute("roleName") %>_queryById.action" target="right">修改口令</a>
            </li>
           </s:else>
          </ul>
         
        <s:if test="#session.role!=1">
       <s:if test="#session.role==12||#session.role==4">
         <h3> 学生管理</h3>
          <ul>
           <li>
            <a href="<%=path %>/admin/student.action" target="right">添加学生信息</a>
            </li> 
             <li>
            <a href="<%=path %>/admin/student_queryList.action?pageList.pageNo=1" target="right">查找学生信息</a>
            </li>   
          </ul>
          </s:if>
          <s:if test="#session.role==4">
             <h3> 用户管理</h3>
          <ul>
           <li>
            <a href="<%=path %>/admin/teacher.action" target="right">添加用户信息</a>
            </li> 
             <li>
            <a href="<%=path %>/admin/teacher_queryList.action?pageList.pageNo=1" target="right">查找用户信息</a>
            </li>   
           
          </ul>
            <h3>岗位管理</h3>
          <ul>
           <li>
            <a href="<%=path %>/admin/quarters.action" target="right">添加岗位</a>
            </li> 
             <li>
            <a href="<%=path %>/admin/quarters_queryList.action?pageList.pageNo=1" target="right">查找岗位信息</a>
            </li>   
          </ul>
            <h3>部门管理</h3>
          <ul>
           <li>
            <a href="<%=path %>/admin/branch.action" target="right">添加部门信息</a>
            </li> 
             <li>
            <a href="<%=path %>/admin/branch_queryList.action?pageList.pageNo=1" target="right">查找部门信息</a>
            </li>   
           
          </ul>
          </s:if>
        </s:if>

       </div>
    </div>
    <div class="main">
       <iframe name="right" id="rightMain" src="main/welcome.jsp" frameborder="no" scrolling="auto" width="100%" height="auto" allowtransparency="true"></iframe>
    </div>
    <div class="bottom">
      <div id="bottom_bg">版权</div>
    </div>
    <div class="scroll">
          <a href="javascript:;" class="per" title="使用鼠标滚轴滚动侧栏" onclick="menuScroll(1);"></a>
          <a href="javascript:;" class="next" title="使用鼠标滚轴滚动侧栏" onclick="menuScroll(2);"></a>
    </div>
</body>

</html>
   
 